/* 
 * File:   global.h
 * Author: tangchao
 *
 * Created on 2013年5月24日, 上午11:16
 */

#ifndef GLOBAL_H
#define	GLOBAL_H

#ifdef	__cplusplus
extern "C" {
#endif
    
//#define debug
#define iprint() do {  printf("thd->thread:%d\nthd->host:%s\nthd->user:%s\n" \
                        "thd->pass:%s\nthd->port:%u\nthd->db:%s\n", \
                        thd->thread, thd->host, thd->user, \
                        thd->pass, thd->port, thd->db); \
        } while (0)
    
typedef struct _pthread_data
{
  int thread;
  int id_offset;
  int query_count;
  char host[0x2F];
  char user[0xF];
  char pass[0x2F];
  unsigned int port;
  char db[0x2F];
}  NG_THD;

int
cmdline_parse(
              int argc,
              char **argv,
              NG_THD *thd);

#ifdef	__cplusplus
}
#endif

#endif	/* GLOBAL_H */

